﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Inventory/InvMaster.master" Theme="ItemsSkin" AutoEventWireup="true" CodeFile="ListItems.aspx.cs" Inherits="Inventory_Items_Management_ListItems" %>


<asp:Content ID="cont" ContentPlaceHolderID="hd" runat="server">
    <script src="../../Scripts/jquery-1.6.4-dev.js" type="text/javascript"></script>
    <script src="../../Scripts/MasterScript.js" type="text/javascript"></script>
    
    <link href="ItemsStyle.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript">
        $(function () {
            $('#ancAddCat').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Categories Selected');
                else $('#extCnt').load("CategoryInfo.aspx?Operation=Register&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#ancEditCat').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Categories Selected');
                else $('#extCnt').load("CategoryInfo.aspx?Operation=Edit&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#ancDeleteCat').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Categories Selected');
                else $('#extCnt').load("CategoryInfo.aspx?Operation=Delete&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#ancAddItem').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Categories Selected');
                else
                $('#extCnt').load("ItemInfo.aspx?Operation=Register&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#ancEditItem').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Items Selected');
                else
                    $('#extCnt').load("ItemInfo.aspx?Operation=Edit&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#ancDeleteItem').click(function () {
                var id = $('#ContentPlaceHolder2_Hidden1').val();
                if (id == "") alert('No Items Selected');
                else
                    $('#extCnt').load("ItemInfo.aspx?Operation=Delete&ParentID=" + id).hide().fadeToggle(1000);
            });

            $('#divOptions').hide();

            $('#').click(function () { });
            $('#divOptsClick').mouseover(function () { $('#divOptions').slideDown('slow'); $('#divOptsClick').slideUp(); });
            $('#divOptions').mouseleave(function () { $('#divOptsClick').slideDown('slow'); $('#divOptions').slideUp('slow'); });

            $('#divMoreSrch').hide();
            $('#MoreSrch').click(function () { $('#divMoreSrch').slideToggle(); });

        }
    );

    
</script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server" ClientIDMode="Static">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div id="extCnt"></div>



<div id="divTree" class="divTree">
        
<table>

    <tr align="center" style="background-color:#FFCC00;"> <td>Inventory Categories</td></tr>
            
    <tr> 
    <td><div  style="width:99%; background-color:transparent; max-width:99%; max-height:93%; height:93%;position:absolute; left:1%;overflow:scroll;">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    
    <asp:TreeView id="TreeVu_Cats" ShowExpandCollapse=true 
        Font-Names= "Arial"
         Font-Size="8pt"
        Width="100%"
        
        
        ForeColor="White"
        NodeIndent="3"
        
        runat="server" ShowLines="True" 
            
          
            onselectednodechanged="TreeVu_Cats_SelectedNodeChanged">
             <SelectedNodeStyle Font-Bold="true" BackColor=HighlightText ForeColor="Black" />
        <LevelStyles>

          <asp:TreeNodeStyle ChildNodesPadding="10" 
          
            Font-Bold="true" 
            Font-Size="12pt" 
            ForeColor="DarkGreen"/>

          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Bold="true" 
            Font-Size="10pt"
            ForeColor="Yellow"/>

          <asp:TreeNodeStyle ChildNodesPadding="5" 
            Font-UnderLine="true" 
            Font-Size="10pt"
            ForeColor="White"/>

          <asp:TreeNodeStyle ChildNodesPadding="10" 
            Font-Size="8pt"
            ForeColor="White"/>

        </LevelStyles>

        <Nodes>

          <asp:TreeNode Value="R" Text="المخزن الرئيسى"/>

        </Nodes>
        </asp:TreeView>

        
        </ContentTemplate>
      
      </asp:UpdatePanel>
        
        <asp:UpdatePanel runat=server>
      <ContentTemplate>
      <input id="Hidden1"  type="hidden" runat="server" />
      </ContentTemplate>
      
      </asp:UpdatePanel>
      </div></td>
    </tr>
    </table>
</div>

<div id="divOptsClick" class="divOptsClick">
<table><tr><td style="width:15%"><img width="90%" src="../../Images/lessarrows.png" /></td><td style="width:85%"><span style="color:White">More Options</span></td></tr></table>
</div>

<div id="divOptions" class="divOptions">
<table>
<tr align="center">
<td><a style="color:White;" href="#" id="ancAddCat">Add Category</a></td>
<td><a style="color:White;" href="#" id="ancEditCat">Edit Category</a></td>
<td><a style="color:White;" href="#" id="ancDeleteCat">Delete Category</a></td>
<td><a style="color:White;" href="#" id="ancAddItem">Add Item</a></td>
<td><a style="color:White;" href="#" id="ancEditItem">Edit Item</a></td>
<td><a style="color:White;" href="#" id="ancDeleteItem">Delete Item</a></td>
</tr>
</table>
</div>

<div id="divGrid" class="divGrid">
<div style="width:100%;  height:6%; text-align:center; background-color:Orange"><span style="font-size:large;font-weight:bold;">Items Information</span></div>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
    <ContentTemplate>
    <asp:GridView ID="GridItems" PageSize="20" AllowPaging="True" 
            runat="server" BackColor="White" BorderColor="#999999" BorderStyle="Solid" 
            BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical" 
            EnableSortingAndPagingCallbacks="false" ShowHeaderWhenEmpty="True" 
            AutoGenerateSelectButton="True" EnablePersistedSelection="True" DataKeyNames="ID"
            onselectedindexchanged="GridItems_SelectedIndexChanged" >

            <AlternatingRowStyle BackColor="#CCCCCC" />
            <FooterStyle BackColor="#CCCCCC" />
            <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
            <PagerSettings Mode="Numeric" />
            <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F1F1F1" />
            <SortedAscendingHeaderStyle BackColor="#808080" />
            <SortedDescendingCellStyle BackColor="#CAC9C9" />
            <SortedDescendingHeaderStyle BackColor="#383838" />
           
        </asp:GridView>
        </ContentTemplate>
    </asp:UpdatePanel>
</div>

<div id="divSearch" class="divSearch">
<table>

    <tr align="center" style="background-color:#FFCC00;"> <td>Inventory Search</td></tr>
            
    <tr> <td/></tr>

    <tr><td><asp:Label ID="Label2" SkinID="Search" runat="server" Text="Item Name:"></asp:Label></td></tr>
    <tr><td><asp:TextBox ID="txt_ItemName" SkinID="Search" runat="server"></asp:TextBox></td></tr>
    <tr> <td/></tr>
    </table>
    <div id="divMoreSrch">
    <table>
    <tr><td><asp:Label ID="Label4" SkinID="Search" runat="server" Text="Serial Number:"></asp:Label></td></tr>
    <tr><td><asp:TextBox ID="txt_SerialNo" SkinID="Search" runat="server"></asp:TextBox></td></tr>
    <tr> <td/></tr>
    <tr><td><asp:Label ID="Label5" SkinID="Search" runat="server" Text="Item Model:"></asp:Label></td></tr>
    <tr><td><asp:TextBox ID="txt_Model" SkinID="Search" runat="server"></asp:TextBox></td></tr>
    <tr> <td/></tr>
    
    <tr><td><asp:Label ID="Label6" SkinID="Search" runat="server" Text="Part Number:"></asp:Label></td></tr>
    <tr><td><asp:TextBox ID="txt_PartNo" SkinID="Search" runat="server"></asp:TextBox></td></tr>
    <tr> <td/></tr>
    </table>
    </div>
    <table>
    <tr><td style="width:20%"><img id="MoreSrch" style="cursor:pointer;" width="70%" src="../../Images/lessarrows.png" /></td><td style="width:80%"><span style="color:White" id="srchMoreOrLess">Advanced Search</span> </td></tr>
    <tr align="center"><td colspan="2">
        <asp:Button ID="btn_Search" SkinID="Search" 
            runat="server" Text="Search" onclick="btn_Search_Click" /></td></tr>
    </table>
</div>
</asp:Content>

